package com.zhuiyun.project.api.dict.service;

import com.zhuiyun.project.api.dict.entity.DictData;
import com.zhuiyun.project.api.dict.model.DictDataModel;
import com.zhuiyun.project.api.dict.model.DictTypeModel;
import com.zhuiyun.project.common.errorCode.CommonException;
import com.zhuiyun.project.common.mapper.BaseMapper;
import com.zhuiyun.project.common.response.CommonResult;
import com.zhuiyun.project.util.pageUtil.PageRequest;

import java.util.List;

/**
 * @ClassName DictDataDservice
 * @Description TODO
 * @Author Root
 * @Date 2023/6/22 11:26
 **/
public interface DictDataService {
    /**
    * @Author Root
    * @Description 修改字典数据
    * @Date 2023/7/27 17:19
    * @Return com.zhuiyun.project.common.response.CommonResult
    * @param dictDataModel
    */
    CommonResult updateDictData(DictDataModel dictDataModel);
    /*
    * @Author Root
    * @Description 通过字典ID查询  分页查询
    * @Date 2023/7/27 17:19
    * @Return com.zhuiyun.project.common.response.CommonResult
    * @param pageRequest
    * @param dictId
    */
    CommonResult selectById(PageRequest pageRequest, Integer dictId);
    /**
    * @Author Root
    * @Description 添加数据
    * @Date 2023/7/27 17:20
    * @Return com.zhuiyun.project.common.response.CommonResult
    * @param dictDataModel
    */
    CommonResult insertDictData(DictDataModel dictDataModel) throws CommonException;
    /*
    * @Author Root
    * @Description 删除字典数据操作
    * @Date 2023/7/27 17:20
    * @Return com.zhuiyun.project.common.response.CommonResult
    * @param dataId
    */
    CommonResult deleteDictData(Integer dataId) throws CommonException;
    /*
    * @Author Root
    * @Description 模糊查询
    * @Date 2023/7/27 17:20
    * @Return com.zhuiyun.project.common.response.CommonResult
    * @param dictLabel
    */
    CommonResult selectLike(String dictLabel);
    /*
    * @Author Root
    * @Description 查询字典数据
    * @Date 2023/7/27 17:21
    * @Return com.zhuiyun.project.common.response.CommonResult
    * @param dictDataModel
    */
    CommonResult selectDict(DictDataModel dictDataModel);
    /*
    * @Author Root
    * @Description 通过id 查询数据
    * @Date 2023/7/27 17:21
    * @Return java.util.List<com.zhuiyun.project.api.dict.entity.DictData>
    
    */
    List<DictData> selectOneById();
}
